Remove extra pixel from the cursor (render_layout_line): fix reversed test
authorHavoc Pennington <hp@redhat.com>
Wed, 15 Nov 2000 17:43:08 +0000 (17:43 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Wed, 15 Nov 2000 17:43:08 +0000 (17:43 +0000)
2000-11-15  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
from the cursor
(render_layout_line): fix reversed test that caused weird
underlines to get drawn

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextdisplay.c

index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index d4ae3688451e608bcbd27fe2148f8e011068a758..bd70adab045db559a50e8fa9c4d8c43794b97608 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-15  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextdisplay.c (gtk_text_layout_draw): Remove extra pixel
+       from the cursor
+       (render_layout_line): fix reversed test that caused weird
+       underlines to get drawn
+
 2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
 
        * gdk/linux-fb/gdkprivate-fb.h:
index 55e8ba3fbad15efe5c2f343c146e139ba1007c9f..ebe457549cd307b04db18f4a56fbc3d7ea4f50a2 100644 (file)
@@ -265,10 +265,10 @@ render_layout_line (GdkDrawable        *drawable,
         {
           if (need_ink)
             pango_glyph_string_extents (run->glyphs, run->item->analysis.font,
-                                        NULL, &logical_rect);
+                                        &ink_rect, &logical_rect);
           else
             pango_glyph_string_extents (run->glyphs, run->item->analysis.font,
-                                        &ink_rect, &logical_rect);
+                                        NULL, &logical_rect);
         }
       else
         {
@@ -785,7 +785,7 @@ gtk_text_layout_draw (GtkTextLayout *layout,
                          line_display->x_offset + cursor->x,
                          current_y + line_display->top_margin + cursor->y,
                          line_display->x_offset + cursor->x,
-                         current_y + line_display->top_margin + cursor->y + cursor->height);
+                         current_y + line_display->top_margin + cursor->y + cursor->height - 1);
 
           cursor_list = cursor_list->next;
         }